import { IPSModelService } from './ipsmodel-service';

/**
 * 模型基础对象
 * @export
 * @interface IPSModelObject
 */
export interface IPSModelObject {
  /**
   * 当前类名
   *
   * @author chitanda
   * @date 2021-05-26 09:05:16
   * @type {string}
   */
  readonly cls: string;
  /**
   * 标准JSON模型
   *
   * @author chitanda
   * @date 2021-04-11 15:04:51
   * @type {IModel}
   */
  readonly M: IModel;
  /**
   * 父模型实例
   *
   * @author chitanda
   * @date 2022-01-05 09:01:37
   * @type {IPSModelObject}
   */
  readonly parent: IPSModelObject;

  /**
   * 由API计算，是当前模型在对应业务域下的唯一识别标识
   *
   * @author chitanda
   * @date 2021-07-27 16:07:27
   * @type {string}
   */
  id: string;

  name: string;

  codeName: string;

  userTag: string;

  userTag2: string;

  userTag3: string;

  userTag4: string;

  userCat: string;

  userParams: IModel;

  /**
   * 模型标识
   *
   * @author chitanda
   * @date 2021-05-26 10:05:20
   * @type {string}
   */
  readonly modelid: string;

  /**
   * 模型类型
   *
   * @author chitanda
   * @date 2021-05-26 10:05:41
   * @type {string}
   */
  readonly modeltype: string;

  readonly modelFilePath: string | null;

  /**
   * 模型路径
   *
   * @author chitanda
   * @date 2022-01-06 15:01:42
   * @type {string}
   */
  readonly modelPath: string;

  readonly mosFilePath: string;

  readonly rtMOSFilePath: string;

  readonly dynaModelFilePath: string;

  readonly mOSFilePath: string;

  /**
   * 初始化
   *
   * @author chitanda
   * @date 2021-12-26 16:12:01
   * @param {IPSModelService} iPSModelService 模型服务
   * @param {string} modelPath 模型路径
   * @param {IModel} [model] 模型
   * @param {IPSModelObject} [parentModel] 父模型对象
   */
  init(iPSModelService: IPSModelService, modelPath: string, model?: IModel, parentModel?: IPSModelObject): void;

  /**
   * 判断是否已实现某接口
   *
   * @param {string} cls
   * @return {*}  {boolean}
   */
  instanceof(cls: string): boolean;

  /**
   * 当前模型服务
   *
   * @author chitanda
   * @date 2021-04-22 11:04:48
   * @return {*}  {IPSModelService}
   */
  getPSModelService(): IPSModelService;

  /**
   * 从子模型查找
   *
   * @author chitanda
   * @date 2022-10-20 11:10:28
   * @param {string} cls
   * @param {IModel} objNode
   * @param {string} [strTag]
   * @return {*}  {IPSModelObject}
   */
  getChildPSModelObject(cls: string, objNode: IModel, strTag?: string): IPSModelObject;

  /**
   * 获取父模型
   *
   * @param {string} cls
   * @return {*}  {IPSModelObject}
   */
  getParentPSModelObject(): IPSModelObject;
  getParentPSModelObject(cls?: string): IPSModelObject;
}
